//获取应用实例
var app = getApp();
Page({
	onLoad: function (options) {
    wx.showLoading({
       title: '加载中',
     });
   },
   onPullDownRefresh: function(){
    this.onShow();
    setTimeout(function(){
      wx.stopPullDownRefresh();
    },1000)
  },
 onShow:function(){
 	 var that = this;
     that.getNewList();
  },
  getNewList:function(){
  	var that = this;
  	var user_id = wx.getStorageSync('user_id');
  	wx.request({
       url: app.globalData.base + '/Home/MyInfo/myNews',
        method: 'post',
        data: {user_id:user_id},
        header: {
          'Content-Type': 'application/x-www-form-urlencoded'
        },
    success:function(res){
    	console.log(res.data.data);
      wx.hideLoading();
      if(res.data.status == '1'){
         that.setData({
          userList:res.data.data,
          status:'1'
         })
      }else{
      	console.log('获取用户失败');
      }
    },
    });
  }
})